<template>
  <div class="toolBox">
    <el-tabs v-model="activeTabName" @tab-click="handleTabClick">
      <!-- <el-tab-pane label="Test" name="first">
        <el-button @click="testFun1">testFun1</el-button>
      </el-tab-pane> -->

      <el-tab-pane label="压缩图片" name="tab1">
        <TinyPng></TinyPng>
      </el-tab-pane>
      <el-tab-pane label="识别颜色" name="tab2">
        <ColorRecognition></ColorRecognition>
      </el-tab-pane>
      <el-tab-pane label="龙骨文件处理" name="first">
        <DragonBones></DragonBones>
      </el-tab-pane>
      <el-tab-pane label="删除文件" name="tab3">
        <DeleteFile></DeleteFile>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script lang="ts">
import { Options, Vue } from "vue-class-component";
import { ElMessage } from "element-plus";

import TinyPng from "./TinyPng.vue";
import ColorRecognition from "./ColorRecognition.vue";
import DragonBones from "./DragonBones.vue";
import DeleteFile from "./DeleteFile.vue";
@Options({
  props: {
    msg: String,
  },
  components: {
    TinyPng,
    ColorRecognition,
    DragonBones,
    DeleteFile
  },
})
export default class ToolBox extends Vue {
  msg!: string;
  activeTabName = "tab1";
  handleTabClick(tab: any, event: any) {
    //console.log(tab, event);
  }
  mounted() {}
  testFun1() {
    // window.open('https://www.baidu.com');
    // setTimeout(async () => {
    //   // robotjs_ipc.compress("D:\\改静态图");
    //   // robotjs_ipc.setKeyboardDelay(0);
    //   // robotjs_ipc.typeString("asda");
    //   // console.log(path.join(__dirname,"abc"));
    //   // console.log("D:\\改静态图");
    // }, 2000);
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
